package com.superman.dao;

import com.superman.entity.Car_Brand_Category;
import com.superman.entity.Record;
import com.superman.entity.Record_User_Car;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public interface IRecordDao {
    List<Record_User_Car> queryRecordAll() throws SQLException, ClassNotFoundException;
    List<Record_User_Car> queryRecordByUserID(String user_id) throws SQLException, ClassNotFoundException;
    List<Record_User_Car> queryRecordByUserIdAndNoReturnInfo(String user_id) throws SQLException, ClassNotFoundException;
    List<Record_User_Car> queryRecordByCarID(String car_id) throws SQLException, ClassNotFoundException;
    List<Record_User_Car> queryRecordByCarIdAndNoReturnInfo(String car_id) throws SQLException, ClassNotFoundException;
    List<Record_User_Car> queryRecordByRecordID(String record_id) throws SQLException, ClassNotFoundException;

    int insertRecord(Record record, Connection conn) throws SQLException;
    int updateRecord(String car_id, String return_date, double payment, Connection conn) throws SQLException;
}
